home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
tpapi1.zip
/
NETWARE.PA1
< prev
next >
Wrap
Text File
|
1991-12-04
|
10KB
|
161 lines
{!R! FONT 15; FTMD 15; EXIT;}
{***************************************************************************}
{** Program : NETWARE **}
{***************************************************************************}
{** Version : 1.0b ** Started : 11/11/91 ** Ended : / / **}
{***************************************************************************}
{******************************** Description ******************************}
{***************************************************************************}
{** OOP library for Netware API. **}
{** **}
{** This unit forms the lowest level object : NETWARE **}
{** **}
{** **}
{***************************************************************************}
{******************************** Information ******************************}
{***************************************************************************}
{** **}
{** **}
{** **}
{** **}
{** **}
{***************************************************************************}
{$I NETWARE.INC}
UNIT NETWARE;
INTERFACE
USES
nwvar;
CONST
MaxSlotsInShell = 8;
TYPE
BufferNameType = (Request, Receive);
BufferType = ARRAY [0 .. 520] OF BYTE;
ConnectionIDTableArrayType = ARRAY [1 .. MaxSlotsInShell] OF ConnectionIDTableType;
FileServerNameTableArrayType = ARRAY [1 .. MaxSlotsInShell] OF Byte48ArrayType;
pNetwareOBJ = ^NetwareOBJ;
NetwareOBJ = object
nwRequestBuffer : BufferType;
nwReceiveBuffer : BufferType;
nwReqOffset : WORD;
nwRecOffset : WORD;
ConnectionIDTablePtr : ^ConnectionIDTableArrayType;
FileServerNameTablePtr : ^FileServerNameTableArrayType;
DriveConnectionTablePtr : ^Byte32ArrayType;
DriveFlagTablePtr : ^Byte32ArrayType;
DriveHandleTablePtr : ^Byte32ArrayType;
FileServerNameTable : ARRAY [1 .. MaxSlotsInShell] OF ObjectNameType;
ServerConnectionIDTable : ARRAY [1 .. MaxSlotsInShell] OF ServerIDTableType;
constructor Init;
PROCEDURE GetWrkstnEnv (VAR VersionString);
FUNCTION PrConnRequest (FunctionNumber : BYTE; ConnectionID : WORD) : WORD;
FUNCTION FileServiceRequest (FunctionNumber : BYTE; VAR RequestBuffer; RequestBufferLength : WORD;
VAR ReceiveBuffer; ReceiveBufferLength : WORD) : WORD;
FUNCTION ServerReq (ServerNumber : WORD; FunctionNumber, SubFunctionNumber : BYTE) : WORD;
PROCEDURE ServerRequest (ServerNumber : WORD; FunctionNumber, SubFunctionNumber : BYTE);
FUNCTION ShellRequest (FunctionNumber : BYTE; VAR RequestBuffer, ReceiveBuffer) : WORD;
FUNCTION TableReq (FunctionNumber, SubFunctionNumber : BYTE; VAR TableAddr) : WORD;
FUNCTION NCPRequest (FunctionNumber : BYTE; RequestBufferLength : WORD; VAR RequestBuffer;
ReceiveBufferLength : WORD; VAR ReceiveBuffer) : WORD;
FUNCTION NCPConnRequest (ConnectionID : WORD; FunctionNumber : BYTE; RequestBufferLength : WORD;
VAR RequestBuffer; ReceiveBufferLength : WORD; VAR ReceiveBuffer) : WORD;
FUNCTION ClrRelReq (FunctionNumber : BYTE; VAR Name) : WORD;
PROCEDURE SetClearReq (FunctionNumber : BYTE);
FUNCTION PhysRecReq (FunctionNumber : BYTE; Handle : WORD; ROffSet : LONGINT; RLength : LONGINT;
Directive : BYTE; TimeOut : WORD) : WORD;
FUNCTION SemaphorReq (FunctionNumber : BYTE; Handle : LONGINT; TimeOut : WORD) : WORD;
FUNCTION LockReq (FunctionNumber, Mode : BYTE; TimeOut : WORD) : WORD;
FUNCTION LogReq (FunctionNumber : BYTE; VAR LogName; Directive : BYTE; TimeOut : WORD) : WORD;
FUNCTION LPTCapReq (FunctionNumber, Device : BYTE) : WORD;
FUNCTION PrnSrvRequest (FunctionNumber : BYTE; BufferSize : WORD; VAR ReceiveBuffer;
PrinterDevice : BYTE) : WORD;
FUNCTION PrCapRequest (FunctionNumber, SubFunctionNumber : BYTE) : WORD;
PROCEDURE GetConnectionIDTable;
PROCEDURE GetDriveConnectionID;
PROCEDURE GetDriveFlagTable;
PROCEDURE GetDriveHandleTable;
PROCEDURE GetFileServerNameTable;
FUNCTION ScanShellTable (FileServerAddress : ServerAddressType) : WORD;
FUNCTION GetFirstFreeSlotInShell : WORD;
PROCEDURE PutFileServerInShell (ConnectionID : WORD);
FUNCTION NextOrderNumberInShell : WORD;
PROCEDURE SortShell (AddServerToShell : BOOLEAN);
PROCEDURE AddFileServerToShell (ConnectionID : WORD; AddServerToShell : BOOLEAN;
FileServerAddress : ServerAddressType);
PROCEDURE RemoveFileServerFromShell (ConnectionID : WORD; ClearShell : BOOLEAN);
PROCEDURE AddToFileServerNameTable (ConnectionID : WORD; ServerName : ObjectNameType);
{MISC FUNCTIONS}
FUNCTION UpperCaseNW (InputString : STRING) : STRING;
PROCEDURE InitRequestBuffer;
PROCEDURE InitReceiveBuffer;
PROCEDURE AddByte (ByteValue : BYTE);
PROCEDURE AddWord (WordValue : WORD);
PROCEDURE AddWordSwap (WordValue : WORD);
PROCEDURE AddLongSwap (LongValue : LONGINT);
PROCEDURE AddArray (VAR Buffer; BufferLength : WORD);
PROCEDURE AddString (InputString : STRING; Start : BYTE);
PROCEDURE AddChar (CharValue : CHAR);
PROCEDURE AddTotal (BufferName : BufferNameType);
PROCEDURE GetByte (VAR Buffer; Location : WORD);
PROCEDURE GetWord (VAR Buffer; Location : WORD);
PROCEDURE GetWordSwap (VAR Buffer; Location : WORD);
PROCEDURE GetLong (VAR Buffer; Location : WORD);
PROCEDURE GetLongSwap (VAR Buffer; Location : WORD);
PROCEDURE GetLongReverse (VAR Buffer; Location : WORD);
PROCEDURE GetArray (VAR Buffer; Location, BufferLength : WORD);
PROCEDURE GetString (VAR Buffer; Location, BufferLength : WORD);
FUNCTION GetTotal (BufferName : BufferNameType) : WORD;
PROCEDURE SetTotal (BufferName : BufferNameType; Total : WORD);
PROCEDURE SetStart (Start : WORD);
PROCEDURE DoWordSwap (Location : WORD);
PROCEDURE DoLongSwap (Location : WORD);
FUNCTION WordSwap (InputWord : WORD) : WORD;
FUNCTION LongSwap (InputLong : LONGINT) : LONGINT;
FUNCTION CheckNetwareVersion (MinimumVersion, MinimumSubVersion, MinimumRevision,
MinimumSFT, MinimumTTS : WORD) : WORD;
FUNCTION ReturnNetwareVersion (VAR MinimumVersion, MinimumSubVersion, MinimumRevision,
MinimumSFT, MinimumTTS : WORD) : WORD;
FUNCTION IsV3Supported (ConnectionID : WORD) : WORD;
FUNCTION IsV22Supported (ConnectionID : WORD) : WORD;
FUNCTION GetSearchOrderFromDriveLetter (Path : PathNameType; DriveLetter : CHAR) : WORD;
FUNCTION GetFileServerAddress (ServerName : ObjectNameType;
VAR FileServerAddress : ServerAddressType) : BOOLEAN;
PROCEDURE ConvertNetworkNumber (NetworkNumber : Byte4ArrayType; VAR OutputString : String8Type);
PROCEDURE ConvertNodeAddress (NodeAddress : Byte6ArrayType; VAR OutputString : String12Type);
FUNCTION HexString (InputLong : LONGINT; Places : BYTE) : STRING;
FUNCTION PtrOfs (InPointer : POINTER; ArrayNum, ArraySize : WORD) : POINTER;
PROCEDURE SwapAsciiZ (InPPtr, InAPtr : POINTER; Len : BYTE; ToPascal : BOOLEAN);
PROCEDURE PtToAsciiZ (InPointer, Outpointer : POINTER; Len : BYTE);
FUNCTION LengthAsciiZ (VAR Buffer) : WORD;
FUNCTION AsciiZToStr (VAR Buffer; Max, StartPosition : BYTE) : STRING;
PROCEDURE StrToAsciiZ (InputString : STRING; VAR OutputAsciiZ);
FUNCTION IntToStr (InputNumber : LONGINT) : STRING;
PROCEDURE _NWMapWildPath (Path : PathNameType; VAR OutPath : PathNameType);
destructor Done; virtual;
END;